<template>
  <div class="con">
    
    <best :best="best"></best>
    <reying :reyingList="reyingList"></reying>
    
  </div>
</template>

<script>
import axios from "axios";
import best from "../../components/hot/best.vue";
import reying from "../../components/hot/reying.vue"
export default {
  name: "hot",
  data() {
    return {
      reyingList: [],
      best: "",
    };
  },
  components: {
    best,
    reying,
  },
  mounted() {
    axios
      .get(
        "/ajax/movieOnInfoList?token=&optimus_uuid=9301B8F0D8A111EBB376757321755EB7A2F821BBA2B047FE86EE9833C24FC202&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        this.reyingList = res.data.movieList;
        this.reyingList.forEach((item) => {
          item.img = item.img.replace("w.h", "64.90");
        });
      });
    axios
      .get(
        "ajax/topRatedMovies?token=&optimus_uuid=9301B8F0D8A111EBB376757321755EB7A2F821BBA2B047FE86EE9833C24FC202&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        this.best = res.data;
      });
  },
};
</script>

<style scoped>
.con {
  margin-top: 154.5px;
  width: 100%;
  margin-bottom: 48px;
  position: relative;
  background: rgb(245,245,245);
}
</style>
